package club.justwill.single.persistence.document;

import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.data.mongodb.core.mapping.Field;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by luoyu on 2/1/16.
 */
@Document(collection = "user_support_project")
public class UserSupportProject extends MongoDocument{
    @Field("user_id")
    private long userId;

    @Field("supported_project_id_list")
    private List<Long> supportedProjectIdList;

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public List<Long> getSupportedProjectIdList() {
        if (supportedProjectIdList == null) {
            supportedProjectIdList = new ArrayList<Long>();
        }
        return supportedProjectIdList;
    }

    public void setSupportedProjectIdList(List<Long> supportedProjectIdList) {
        this.supportedProjectIdList = supportedProjectIdList;
    }
}
